<?php
namespace pfp\lib {
    
    \defined('_JEXEC') or die('Restricted access');

    /**
     *
     * @author George Zeakis<zeageorge@google.com>
     */
    interface DatabaseAdapterInterface {

        /**
         * @return boolean 
         */
        public function connect(deepDynamicContainer $dbData);

        public function disconnect();

        /**
         * select
         * @param string $sql An SQL string
         * @param array $array Paramters to bind
         * @param constant $fetchMode A PDO Fetch mode
         * @return array|boolean
         */
        public function select($sqlQuery, array $BindParams = array(), $fetchMode = \PDO::FETCH_ASSOC);

        /**
         * insert
         * @param string $table A name of table to insert into
         * @param array $data An associative array
         * @return boolean|integer Returns FALSE on error, or the id of the inserted row
         */
        public function insert($table, array $data);

        /**
         * update
         * @param string $table A name of table to insert into
         * @param array $data An associative array
         * @param string $where the WHERE query part
         * @return boolean|integer Returns FALSE on error, or the number of affected rows
         */
        public function update($table, array $data, $where);

        /**
         * delete
         * @param string $table
         * @param string $where
         * @param integer $limit
         * @return boolean|integer Returns FALSE on error, or the number of affected rows
         */
        public function delete($table, $where, $limit = 1);

        public function delete_all($table, $where);

        /**
         * 
         * @return deepDynamicContainer
         */
        public function get_dbData();


    }
}
?>
